<template>
	<view>
		<zy-table :tableWidth="'560px'" :headList="headList" :dataList="dataList" :operationShow="true"
			:operationList="operationList">
		</zy-table>
	</view>
</template>

<script>
	import {
		getWarehouseApply
	} from "@/api/homepage.js"
	export default {
		data() {
			return {
				headList: [{
						name: this.$t('homepage.AccessoryManagement.bill_user_name'),
						key: 'bill_user_name',
					},
					{
						name: this.$t('homepage.AccessoryManagement.bill_date'),
						key: 'bill_date',
					},
					{
						name: this.$t('homepage.AccessoryManagement.apply_num'),
						key: 'apply_num',
					},
					{
						name: this.$t('public.num'),
						key: 'count',
					},
				],
				dataList: [],
				operationList: [{
					kind: "button",
					type: "primary",
					handle: this.editBtn,
					label: this.$t('public.edit'),
				} ],
			}
		},
		onLoad() {
			this.getWarehouseOutQueryListMap()
		},
		methods: {
			getWarehouseOutQueryListMap() {
				getWarehouseApply({
					checkStatus: 0,
				}).then((res) => {
					console.log(res)
					if (res.code == 0) {
						this.dataList = res.data
					} else {
						uni.$u.toast(res.message)
					}
				})
			},
			// 表格编辑
			editBtn(item, index) {
				uni.navigateTo({
					url: "./detail?scanDeliveryId=" + item.id
				})
			},
		}

	}
</script>

<style lang="scss" scoped>
</style>
